<?php
class OrderTravelForm extends OrderAddonTravel{
	public $agree = 1;
	public function rules() {
		return array_merge(parent::rules(), array(
			array('agree', 'agreeRules'),
		));
	}
	public function agreeRules($attribute, $params) {
		if($this->$attribute == 2)
			$this->addError($attribute, '您必须接受协议内容');
	}
}